using Android.OS;
using Android.Views;
using Bulb.Core.ViewModels;
using Cirrious.MvvmCross.Droid.Views;
using MyAndroid = Android;

namespace Bulb.UI.Android.Views
{
    public class BaseView : MvxActivity
    {
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
        }

        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
                case MyAndroid.Resource.Id.Home:
                    OnBackPressed();
                    return true;
                default:
                    return base.OnOptionsItemSelected(item);
            }
        }
    }

}